package com.dmwork.service.interaction.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dmwork.service.interaction.entity.WorkCollect;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 李天
 * @since 2021-03-20
 */

@Mapper
@Repository
public interface WorkCollectMapper extends BaseMapper<WorkCollect> {

    List<String> selectWorkIdList(Page<WorkCollect> page, @Param(Constants.WRAPPER) QueryWrapper<WorkCollect> queryWrapper);

    Integer getCollectCountByWorkId(@Param("workId") String workId);

    Integer getCollectCountByCustomerId(@Param("customerId") String customerId);

    List<String> selectWorkIdListByQuery(@Param("customerId") String customerId,@Param("collectGroupId") String collectGroupId, @Param("list") List<String> workIdList);
}
